package study;/*
 * 白耀维
 * 2022/10/18 17:08
 */
import java.util.Scanner;
public class text1 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        int n=input.nextInt();
        int i;
        int m;
        for(i=1;i<=n;i++){
            for(m=1;m<=n-i;m++){
                System.out.print(" ");
            }
            int t=i;
            for(m=1;m<=t;m++){
                System.out.printf("%d",i);
                i--;
            }
            i=1;
            for(m=1;m<=t-1;m++){
                System.out.printf("%d",++i);
            }
            i=t;
            System.out.println();
        }
    }
}
